<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@ include file="/include/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/servicePro/jquery.uploadify.min.js"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/servicePro/uploadify.css">
<script type="text/javascript">
      $(function(){  
	  $("#update_manager_dialog").dialog({
		    autoOpen : false,
		    width : 700,
		    draggable : true,
		    resizable : false,
		    height:250,
		    buttons : [ {
		      text : "提交",
		      click : function() {
		      	  updateManager();
		     	 $(this).dialog("close");		      	
		      }
		    }, {
		      text : "取消",
		      click : function() {
		        $(this).dialog("close");
		        
		      }
		    } ]
	  });
	  });
    /**审核撤销信息**/
     function updateManager(){
        var uid=$.trim($("#uid").val()); 
	    var utype=$.trim($("#utype").val());  
	    var udesc=$.trim($("#udesc").val());
	    if(uid.length==0  || utype.length==0||udesc.length==0){
	      alert("输入信息不能为空!");
	        return false;
	    } 
	     $.ajax( {
				type : "POST",
				url : "<%=request.getContextPath()%>/back/revoke/auditRevoke.do",
				data:{"id":uid,"type":utype,"pdesc":udesc},
				dataType: "json",
				async : false,
				success : function(data) {
					if(data.code=="0000"){
			       		 alert("操作成功!");
			       		 location.reload();
			       }else{
			           alert(data.code+data.codeMsg);
			       }
				}
		  });         
     }
     
   </script>
<title>Document</title>


</head>
<body  >
	<div class="container">
		<div class="main_top">

			<div class="main_right fr span10">

				<div class="box pl5">
					<div class="box_border">
						<div class="box_top">
							<div class="box_top_l fl">
								<b class="pl15">数据</b>
							</div>
						</div>
						<form id="form1" method="post" action="<%=request.getContextPath()%>/back/revoke/getRevokeBeans.do">
								<div class="searchDiv fl">
									  <select name="status" id="status" class="input-text_popup_form"  style="width:100px" maxlength="150" >
									    <option value="1" <c:if test="${status==2}">selected="selected"</c:if>>已处理</option>
									    <option value="0" <c:if test="${status==1}">selected="selected"</c:if>>未处理</option>
									  </select>	
									 <input type="submit" value="搜索" class="btn btn82 btn_search">

								</div>
						
							</form>
						<div class="box_center">
							<div id="table" class=" fl mt10">
								<div class="box span10 oh">
									<table width="100%" border="0" cellpadding="0" cellspacing="0"
										class="list_table">
										<tr>
											<th width="1.5%">序号</th>
											<th width="3%">撤销对象</th>
											<th width="3%">撤销内容</th>
											<th width="5%">撤销类型</th>
											<th width="5%">撤销原因</th>
											<th width="5%">撤销申请人</th>
											<th width="5%">处理状态</th>
											<th width="5%">操作</th>
										</tr>
										<c:if test="${fn:length(revokeList)==0}"><tr class="tr"><td align="center" colspan="8">暂无数据</td> </tr></c:if>
										<c:if test="${fn:length(revokeList)>0}">
										<c:forEach items="${revokeList}" var="dic" varStatus="abc">
											<tr class="tr">
											    <td align="center"><c:out value="${(PageBean.currentpage-1)*PageBean.pagesize+abc.index + 1}" /></td>
												<td align="center">
												 <c:if test="${dic.revokeObjType =='7'}">作品</c:if>
												 <c:if test="${dic.revokeObjType == '10' }">评论</c:if>
                                                </td>
												<td align="center">
                                                  <c:if test="${dic.revokeObjType =='7'}">活动名：${dic.revokeContent };作品名:${dic.workname }</c:if>
												 <c:if test="${dic.revokeObjType == '10' }">评论内容:${dic.revokeContent }</c:if>
                                                 </td>
                                                 <td align="center">
                                                    <c:out value="${dic.revokeType}" />
                                                 </td>
                                                 <td align="center">
                                                    <c:out value="${dic.revokeDesc}" />
                                                 </td>
                                                 <td align="center">
                                                    <c:out value="${dic.username}" />
                                                 </td>
                                                 <td align="center">
                                                  <c:if test="${dic.status =='1'}">未处理</c:if>
												 <c:if test="${dic.status == '2' }">已处理</c:if>
                                                 </td>
												<td align="center">
													<c:if test="${dic.status =='1'}">
														<input type="button" class="new_btn new_btn_up" value="审核"  >
													</c:if>
													<c:if test="${dic.status =='2'}">
														<input type="button" class="new_btn new_btn_up" disabled value="已审核"  >
													</c:if>

												  </td>
												  <td style="display:none;"><c:out value="${dic.revokeid}" /></td>
												  <td style="display:none;"><c:out value="${dic.status}" /></td>
												   <td style="display:none;"><c:out value="${dic.pdesc}" /></td>
											</tr>
										</c:forEach>
                                     </c:if>
									</table>
									<div class="fr fontblack mt25 mb20 mr20">
										每页条数：<a href="<%=request.getContextPath()%>/back/revoke/getRevokeBeans.do?pz=5"
											class="${pageSize == 5 ? 'fontpink' : ''}">5</a> | <a
											href="<%=request.getContextPath()%>/back/revoke/getRevokeBeans.do?pz=10"
											class="${pageSize == 10 ? 'fontpink' : ''}">10</a> | <a
											href="<%=request.getContextPath()%>/back/revoke/getRevokeBeans.do?pz=20"
											class="${pageSize == 20 ? 'fontpink' : ''}">20</a>
									</div>
									<div class="fr fontblack mt5 mb20 mr20">
										<jsp:include page="../template/commonPagination.jsp">
											<jsp:param name="url" value="getRevokeBeans.do?"></jsp:param>
										</jsp:include>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="clear"></div>
		</div>
	</div>
 <script type="text/javascript">
	     $("#table tr").on("click", "td:eq(7) input:eq(0)", function(e) {
	        closeOtherJDialog();
	        e.stopPropagation();
	        var dialog =  $("#update_manager_dialog");
	         dialog.dialog("open");
              var tr = $(this).parent().parent();
		      tr.data("tdArr", ["td:eq(8)","td:eq(10)"]);
		      tr.data("inputArr", ["input:eq(0)","input:eq(1)"]);
		      for (var i = 0, length = tr.data("tdArr").length; i < length; i++) {
		       $(tr.data("inputArr")[i], dialog).val($.trim($(tr.data("tdArr")[i], tr).text()));
		 }
   
	     });
  </script> 
		<!-- 修改字典信息 -->
		<div id="update_manager_dialog" title="审核撤销信息" style="display:none;">
		<div class="box span10 oh">
		<input type="hidden" id="uid"   />
			<table class="list_table"  id="tb_version_update" >
			  <tr class="tr">
					<td align="left">&nbsp;&nbsp;审核结果:</td>
					<td><select id="utype" name="utype" class="select pd10">
					<option value="1">拒绝</option>
					<option value="2">通过</option>
					</select>
				</td>
				</tr>
				<tr class="tr">
					<td align="left">&nbsp;&nbsp;审核理由:</td>
					<td>
					 <input type="text" id="udesc" name="udesc" class="input-text_popup_form" style="width:300px" maxlength="50">
					</td>
				</tr>
			</table>
		</div>
		</div>
		
</body>

</html>
